import request from './request'

/**
 * 获取后台菜单
 * @param {*} data
 * @returns
 */
export const getMenuListTree = () => {
  return request({
    url: '/menu/list/tree',
    method: 'GET'
  })
}

/**
 * 新增菜单
 * @param {*} data
 * @returns
 */
export const addMenu = (data) => {
  return request({
    url: '/menu/add',
    method: 'post',
    data
  })
}

/**
 * 修改菜单
 * @param {*} data
 * @returns
 */
export const updateMenu = (data) => {
  return request({
    url: '/menu/update',
    method: 'put',
    data
  })
}
